<{include file="public/header.html"}> 
	<header class="title title-border-sm bj-white">
            <a href="<{eval url('account/security')}>" class="icon-return iconfont title-left title-top col-red">&#xe604;</a>
            <h1 class="text-center name">基本资料</h1>
	</header>
	<div class="security">
		<ul class="plr15">
			<li class="border-bottom-sm">
				<a href="javascript:;" class="f-cb plr5 publicPhoto modify-headimg-btn">
					<p class="fl">头像</p>
					<font class="iconfont fr ml5 col-greyccc">&#xe630;</font>
                                        <img src="<{$user_info['head_img']}>" id="headImg" class="head fr mt5"/>
				</a>
			</li>
			<li class="border-bottom-sm">
				<a href="<{eval url('account/nickname')}>" class="f-cb plr5">
					<p class="fl">昵称</p>
					<font class="iconfont fr ml5 col-greyccc">&#xe630;</font>
					<i class="fr col-grey999"><{$user_info['nickname']}></i>
				</a>
			</li>
			<li class="border-bottom-sm">
				<a href="javascript:;" class="f-cb plr5 publicSex modify-sex-btn">
					<p class="fl">性别</p>
					<font class="iconfont fr ml5 col-greyccc">&#xe630;</font>
					<i class="fr col-grey999"><{if $user_info['sex'] == 1}>男<{else}>女<{/if}></i>
				</a>
			</li>
			<li class="border-bottom-sm">
                            <a href="<{eval url('account/signature')}>" class="f-cb plr5">
					<p class="fl">个性签名</p>
					<font class="iconfont fr ml5 col-greyccc">&#xe630;</font>
					<i class="fr col-grey999 textnum10"><{$user_info['signature']}></i>
				</a>
			</li>
		</ul>
	</div>
	<!--选取相册-->
	<div class="public-field-bj publick-jq1 photo-box">
            <div class="public-field-photo public-field-phone w100 photo-content-box">
                <div class="plr15">
                    <ul class=" bj-white">
                        <li data-type="0">选取方式</li>
                        <li data-type="1">相册
                            <input class="upload" type="file" accept="image/*;capture=camera" id="uploadFile" /> 
                        </li>
                    </ul>
                    <button class="btn bj-white mt5 close-jq _close">取消</button>
                </div>
            </div>
	</div>
	<!--选取性别-->
	<div class="public-field-bj publick-jq2 sex-box">
		<div class="public-field-sex public-field-phone w100 sex-content-box">
			<div class="plr15">
				<ul class=" bj-white">
                                    <li data-type="0">选取方式</li>
                                    <li data-type="1">男</li>
                                    <li data-type="2">女</li>
				</ul>
				<button class="btn bj-white mt5 close-jq _close">取消</button>
			</div>
		</div>
	</div>
        <script type="text/javascript" src="/static/js/jquery.html5uploader.js"></script>
        <script type="text/javascript" src="/static/js/account-min-1.0.js"></script>
        <script type="text/javascript">
//            document.addEventListener('DOMContentLoaded', init, false);
            $(function(){
                setTimeout(function(){init();},1000);
            });
            function init() {   
                var u = new UploadPic();   
                u.init({   
                    input: document.querySelector('#uploadFile'),   
                    callback: function (base64) {   
                        $.ajax({   
                           url:"http://static.tan66.com/upload/base64_img.html",//上传接口   
                           data:{str:base64,type:this.fileType,width:90,height:90},   
                           type:'post',   
                           dataType:'json',   
                           success:function(res){ 
                               res = eval(res);
                               if(res.result == 1){
                                    $("#headImg").attr("src",res.img_url);
                                    $.mvalidateTip("修改成功");
                                    doRequest("/ajax/ajax_modify_baseinfo",{setValue:res.img_url,setType:"head_img"},true,function(data){
                                    },function(data){});
                               }else{
                                    $.mvalidateTip(res.info);
                               }
                           }   
                        })   
                    },
                    loading: function () {   

                    }   
                });   
            }   
        </script>
<{include file="public/footer.html"}> 